-
Notifications
You must be signed in to change notification settings - Fork 8k
Enable temperature sensor on rt700 #95630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Enable temperature sensor on rt700 #95630
Conversation
aa65fbd
to
aa11bf2
Compare
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
604ed81
to
cb2e633
Compare
cb2e633
to
65b5238
Compare
Hello @MaureenHelm, could you please revisit this pr? I think all your comments have been fixed. Thanks! |
dts/arm/nxp/nxp_rt7xx_cm33_cpu0.dtsi
Outdated
mbox4: mailbox@189000 { | ||
#mbox-cells = <1>; | ||
|
||
compatible = "nxp,mbox-imx-mu"; | ||
reg = <0x189000 0x1000>; | ||
|
||
interrupts = <31 0>; | ||
rx-channels = <4>; | ||
|
||
status = "disabled"; | ||
}; | ||
|
||
pmc_tmpsns: pmc-tmpsns { | ||
compatible = "nxp,pmc-tmpsns"; | ||
status = "disabled"; | ||
}; | ||
}; | ||
|
||
&systick { | ||
/* | ||
* RT700 cm33_cpu0 relies by default on the OS Timer for system | ||
* clock implementation, so the SysTick node is not to be enabled. | ||
*/ | ||
status = "disabled"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some extra stuff is being added that looks unrelated to the sensor. Rebasing mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for that, it would be a accident, i will update shortly
645d098
to
a1a07f9
Compare
This PR will get twister failures as know issue #96718 |
830dbdd
to
1fa40eb
Compare
@jeppenodgaard, please review |
|
LGTM. Other requests needs to be addressed before I can approve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok, but need to resolve the twister failures
I can reproduce this issue on zephyr latest main branch, hello @hakehuang, did you catch this issue? Thanks. |
Thanks #97020 @ZhaoxiangJin |
Pull in romapi for RT7xx Signed-off-by: Zhaoxiang Jin <[email protected]>
This commit introduced NXP pmc temperature sensor (pmc-tmpsns) driver. Signed-off-by: Zhaoxiang Jin <[email protected]>
1. add pmc-tmpsns to rt7xx dts 2. add pmc-tmpsns to rt700 evk Signed-off-by: Zhaoxiang Jin <[email protected]>
enable rt700 die_temp_polling sample Signed-off-by: Zhaoxiang Jin <[email protected]>
1fa40eb
to
e57e5fd
Compare
rebased to main, ci issue should be fixed in main. |
Hello @hakehuang, I see #97020 is closed, I tried to rebase to the latest main, but the CI show new failures, could you please help check again? Thanks! |
@ZhaoxiangJin all RT700 testing is blocked by #96718, I would suggest to block all RT700 PRs until this gets resolved. |
|
||
cm_vref = cm_ctat + (953.36f + calibration) * cm_temp / 2048; | ||
|
||
data->pmc_tmpsns_value = 370.98f * (cm_temp / cm_vref) - 273.15f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to remove the float calculation above and change to int32 instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to know your starting point of the suggestion, actually this driver will only be used by RT500, RT600, and RT700, which all have FPU, so I think it is necessary to maintain accuracy as much as possible during the calculation process.
test result: